#include <iostream>

using namespace std;


int main(int argc, char const *argv[])
{
    int someInteger = 256;
    short someShort;
    long someLong;
    float someFloat;
    double someDouble;

    someInteger++;
    someInteger *= 2;
    someShort = (short)someInteger;
    someLong = someShort * 10000; //5140000
    someFloat = someLong + 0.785; //5140000.785
    someDouble = (double)someFloat / 100000; //51.40000785

    cout << someDouble << endl;
    printf("%f\n", someDouble);

    return 0;
}
